using System;
using System.Collections.Generic;

namespace Datacollection.Data.Models
{
    /// <summary>
    /// 测试汇总信息
    /// </summary>
    public class TestSummary
    {
        /// <summary>
        /// 条码信息
        /// </summary>
        public string Barcode { get; set; }
        
        /// <summary>
        /// 所有测试项结果
        /// </summary>
        public List<TestResult> TestItems { get; set; } = new List<TestResult>();
        
        /// <summary>
        /// 整体测试结果（通过/失败）
        /// </summary>
        public bool IsPassed => !IsFailed;
        
        /// <summary>
        /// 整体测试是否失败
        /// </summary>
        public bool IsFailed { get; set; }
        
        /// <summary>
        /// 测试开始时间
        /// </summary>
        public DateTime StartTime { get; set; } = DateTime.Now;
        
        /// <summary>
        /// 测试结束时间
        /// </summary>
        public DateTime EndTime { get; set; }
    }
}
    